furny.ga.logger
Class GADatabaseLogger

java.lang.Object
  extended by furny.ga.logger.GADatabaseLogger
All Implemented Interfaces:
IGALogger<FurnLayoutIndividual>

public class GADatabaseLogger
extends java.lang.Object
implements IGALogger<FurnLayoutIndividual>

GA logger that outputs informations to a database.

Since:
11.08.2012
Author:
Stephan Dreyer

Field Summary
private  java.util.concurrent.ExecutorService executor
           
private  EvaluationRunEntry run
           
 
Constructor Summary
GADatabaseLogger()
          Creates a new database logger.
 
Method Summary
 void allIndividualsEvaluated(int generation, IPopulation<FurnLayoutIndividual> population)
          Notifies about the population that has been evaluated.
 void evaluationStarted()
          Notifies about the start of the evaluation.
 void exit()
          Notifies about the termination of the algorithm.
 void individualEvaluated(int generation, FurnLayoutIndividual individual)
          Notifies about an individual that has been evaluated.
 void individualsCrossed(int generation, IndividualList<FurnLayoutIndividual> individuals)
          Notifies about individuals that have been crossed.
 void individualSelectedForEvaluation(int generation, FurnLayoutIndividual individual)
          Notifies about an individual that has been selected for evaluation.
 void individualsInserted(int generation, IndividualList<FurnLayoutIndividual> individuals, IPopulation<FurnLayoutIndividual> population)
          Notifies about individuals that have been inserted into the population.
 void individualsMutated(int generation, IndividualList<FurnLayoutIndividual> individuals)
          Notifies about individuals that have been mutated.
 void individualsSelected(int generation, IndividualList<FurnLayoutIndividual> individuals)
          Notifies about individuals that have been selected.
 void populationInitiated(int generation, IPopulation<FurnLayoutIndividual> population)
          Notifies about the initialization of the population.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

run

private EvaluationRunEntry run

executor

private final java.util.concurrent.ExecutorService executor
Constructor Detail

GADatabaseLogger

public GADatabaseLogger()
Creates a new database logger.

Since:
11.08.2012
Method Detail

evaluationStarted

public void evaluationStarted()
Description copied from interface: IGALogger
Notifies about the start of the evaluation.

Specified by:
evaluationStarted in interface IGALogger<FurnLayoutIndividual>

allIndividualsEvaluated

public void allIndividualsEvaluated(int generation,
                                    IPopulation<FurnLayoutIndividual> population)
Description copied from interface: IGALogger
Notifies about the population that has been evaluated.

Specified by:
allIndividualsEvaluated in interface IGALogger<FurnLayoutIndividual>
Parameters:
generation - The current generation.
population - The population that has been evaluated.

populationInitiated

public void populationInitiated(int generation,
                                IPopulation<FurnLayoutIndividual> population)
Description copied from interface: IGALogger
Notifies about the initialization of the population.

Specified by:
populationInitiated in interface IGALogger<FurnLayoutIndividual>
Parameters:
generation - The current generation.
population - The population that has been initialized.

individualsSelected

public void individualsSelected(int generation,
                                IndividualList<FurnLayoutIndividual> individuals)
Description copied from interface: IGALogger
Notifies about individuals that have been selected.

Specified by:
individualsSelected in interface IGALogger<FurnLayoutIndividual>
Parameters:
generation - The current generation.
individuals - The list of selected individuals.

individualsCrossed

public void individualsCrossed(int generation,
                               IndividualList<FurnLayoutIndividual> individuals)
Description copied from interface: IGALogger
Notifies about individuals that have been crossed.

Specified by:
individualsCrossed in interface IGALogger<FurnLayoutIndividual>
Parameters:
generation - The current generation.
individuals - The list of crossed individuals.

individualsMutated

public void individualsMutated(int generation,
                               IndividualList<FurnLayoutIndividual> individuals)
Description copied from interface: IGALogger
Notifies about individuals that have been mutated.

Specified by:
individualsMutated in interface IGALogger<FurnLayoutIndividual>
Parameters:
generation - The current generation.
individuals - The list of mutated individuals.

individualsInserted

public void individualsInserted(int generation,
                                IndividualList<FurnLayoutIndividual> individuals,
                                IPopulation<FurnLayoutIndividual> population)
Description copied from interface: IGALogger
Notifies about individuals that have been inserted into the population.

Specified by:
individualsInserted in interface IGALogger<FurnLayoutIndividual>
Parameters:
generation - The current generation.
individuals - The list individuals that have been inserted.
population - The population where the individuals have been inserted.

individualSelectedForEvaluation

public void individualSelectedForEvaluation(int generation,
                                            FurnLayoutIndividual individual)
Description copied from interface: IGALogger
Notifies about an individual that has been selected for evaluation.

Specified by:
individualSelectedForEvaluation in interface IGALogger<FurnLayoutIndividual>
Parameters:
generation - The current generation.
individual - The selected individual.

individualEvaluated

public void individualEvaluated(int generation,
                                FurnLayoutIndividual individual)
Description copied from interface: IGALogger
Notifies about an individual that has been evaluated.

Specified by:
individualEvaluated in interface IGALogger<FurnLayoutIndividual>
Parameters:
generation - The current generation.
individual - The evaluated individual.

exit

public void exit()
Description copied from interface: IGALogger
Notifies about the termination of the algorithm. The logger must shut down, too.

Specified by:
exit in interface IGALogger<FurnLayoutIndividual>